#ifndef USERPROG_PROCESS_H
#define USERPROG_PROCESS_H

#include "threads/thread.h"
#include "threads/synch.h"

tid_t process_execute (const char *file_name);
int process_wait (tid_t);
void process_exit (void);
void process_activate (void);
void syscall_exit(int status);

struct list wait_list;

struct wait_elem{
	struct thread *cur;
	struct thread *child;
	bool finished;
	int status;
	struct list_elem elem;
};

struct executed_item
{
	int tid;
	int exit_status;
	struct list_elem elem;
};

struct thread *old_parent;

struct argument_sync{
	struct semaphore s;
	char *fn;
	bool success;
};

#endif /* userprog/process.h */
